person_info = {
    "name": "Alex",
    "age": 30,
    "country": "USA",
    "language": ["English", "Spanish"],
    "is_student": False
}

print(person_info["name"])  # 输出: Alex


person_info["age"] = 31
print(person_info)
# person_info → {'name': 'Alex', 'age': 31, ...}


person_info["height"] = 175
print(person_info)
# person_info → {..., 'height': 175}


del person_info["is_student"]
print(person_info)
# person_info → 不再包含'is_student'


for key, value in person_info.items():
    print(f"{key}: {value}")
# 输出:
# name: Alex
# age: 31
# country: USA
# language: ['English', 'Spanish']
# height: 175


if "email" not in person_info:
    person_info["email"] = "alex@example.com"
print(person_info)
# person_info → {..., 'email': 'alex@example.com'}


person_info["language"] = ["English"]
print(person_info)
# person_info → {'language': ['English'], ...}


print(len(person_info["language"]))  # 输出: 1


person_info["language"].append("French")
print(person_info)
# person_info → {'language': ['English', 'French'], ...}


for i in range(1, 4):
    person_info[f"hobby + {i}"] = f"hobby{i}"
print(person_info)
# person_info → {..., 'hobby + 1': 'hobby1', 'hobby + 2': 'hobby2', 'hobby + 3': 'hobby3'}